package com.youshang.model;

/**
 * 屏蔽隐藏字段位置
 */
public class MaskModel {

    /**
     * 默认脱敏标识为: *
     */
    private char markChar;

    /**
     * 目标位置 默认：0
     */
    private Integer position;

    /**
     * 偏移量 默认：0
     *
     */
    private Integer offset;

    private MaskModel(){}
    private MaskModel(char markChar,Integer position,Integer offset){
        this.markChar = markChar;
        this.position = position;
        this.offset = offset;
    }
    public static MaskModelBuilder builder(){
        return new MaskModelBuilder();
    }
    public static class MaskModelBuilder{
        /**
         * 默认脱敏标识为: *
         */
        private char markChar;

        /**
         * 目标位置 默认：0
         */
        private Integer position;

        /**
         * 偏移量 默认：0
         *
         */
        private Integer offset;

        public MaskModelBuilder markChar(char markChar) {
            this.markChar = markChar;
            return this;
        }
        public MaskModelBuilder position(Integer position) {
            this.position = position;
            return this;
        }
        public MaskModelBuilder offset(Integer offset) {
            this.offset = offset;
            return this;
        }
        public MaskModel build(){return new MaskModel(markChar, position, offset);}
    }

    public Integer getOffset() {
        return offset;
    }

    public Integer getPosition() {
        return position;
    }

    public char getMarkChar() {
        return markChar;
    }

    public void setMarkChar(char markChar) {
        this.markChar = markChar;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }
}
